-
Notifications
You must be signed in to change notification settings - Fork 273
Use per-project Sentry configuration #4818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| autoInstallation.enabled = false | ||
| includeDependenciesReport = false | ||
| ignoredBuildTypes = setOf("debug", "debugProd") | ||
| ignoredBuildTypes = setOf("debug", "debugProd", "prototype") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an unrelated change but I forgot to exclude prototype builds from Sentry uploads.
Generated by 🚫 Danger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates Sentry configuration from a single sentry.properties file to per-project Gradle configuration, enabling separate Sentry projects for Android, Automotive, and Wear applications.
Key Changes
- Added Sentry configuration properties (auth token, org, and project names) to
dependencies.gradle.kts - Configured project-specific Sentry project names in each application module's build file
- Renamed
configureSentry()toapplyCommonSentryConfiguration()and added auth token and org configuration - Added "prototype" to ignored build types for Sentry uploads
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| dependencies.gradle.kts | Adds five new Sentry-related properties from secret properties: auth token, org, and three project names |
| build.gradle.kts | Renames Sentry configuration function, adds auth token and org properties, includes "prototype" in ignored build types, removes unused import |
| app/build.gradle.kts | Configures Android project-specific Sentry project name |
| automotive/build.gradle.kts | Configures Automotive project-specific Sentry project name |
| wear/build.gradle.kts | Configures Wear project-specific Sentry project name |
Description
Currently, our builds upload data to our main Android Sentry project. Since we decided to split Android, Automotive, and Wear apps into separate ones, this now needs to be handled in the build system.
Our Sentry configuration is stored in the
sentry.propertiesfile. However, this file lives in the root project. I wasn’t able to find anything in the Sentry documentation indicating whether it’s possible to have multiple such files one in each sub-project or to define per-project properties within the root file.To address this, I propose configuring everything through the Gradle plugin. This change will need to be accompanied by an update to the
mobile-secretsrepo to add the necessary properties. I can do it once we agree on the approach and sync the modifications in both repositories.Relates to: https://linear.app/a8c/issue/AINFRA-1610/
Testing Instructions
I'm not sure if it is possible to test it really until we create a release build. But if anyone has an idea I'd like to know.